
package com.rt.schedulenew.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rt.schedulebase.dto.ExamPatientIdDto;
import com.rt.schedulebase.entity.ExamPatientId;
import com.rt.schedulebase.mapper.ExamPatientIdMapper;
import com.rt.schedulenew.api.IExamPatientIdService;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ExamPatientIdServiceImpl extends ServiceImpl<ExamPatientIdMapper, ExamPatientId> implements IExamPatientIdService
{
@Override
    public boolean insertSelective(final ExamPatientId examPatientId) {
        return this.retBool(Integer.valueOf(((ExamPatientIdMapper)this.baseMapper).insert(examPatientId)));
    }
    
@Override
    public boolean deleteByPrimaryKey(final String key) {
        return this.retBool(Integer.valueOf(((ExamPatientIdMapper)this.baseMapper).deleteById((Serializable)key)));
    }
    
@Override
    public boolean updateByPrimaryKeySelective(final ExamPatientId examPatientId) {
        return this.retBool(Integer.valueOf(((ExamPatientIdMapper)this.baseMapper).updateById(examPatientId)));
    }
    
@Override
    public ExamPatientId selectByPrimaryKey(final String key) {
        return (ExamPatientId)((ExamPatientIdMapper)this.baseMapper).selectById((Serializable)key);
    }
    
@Override
    public List<ExamPatientId> getList(final ExamPatientIdDto dto) {
        final QueryWrapper<ExamPatientId> qw = (QueryWrapper<ExamPatientId>)new QueryWrapper();
        final Map<String, Object> map = new HashMap<String, Object>();
        qw.allEq((Map)map, false);
        final List<ExamPatientId> list = (List<ExamPatientId>)((ExamPatientIdMapper)this.baseMapper).selectList((Wrapper)qw);
        return list;
    }
    
@Override
    public List<ExamPatientId> getListAll() {
        return (List<ExamPatientId>)((ExamPatientIdMapper)this.baseMapper).selectList((Wrapper)null);
    }
    
@Override
    public boolean delete(final ExamPatientId examPatientId) {
        final UpdateWrapper<ExamPatientId> uw = (UpdateWrapper<ExamPatientId>)new UpdateWrapper();
        final Map<String, Object> map = new HashMap<String, Object>();
        uw.allEq((Map)map, false);
        return this.retBool(Integer.valueOf(((ExamPatientIdMapper)this.baseMapper).delete((Wrapper)uw)));
    }
    
@Override
    public boolean update(final ExamPatientId examPatientId) {
        final UpdateWrapper<ExamPatientId> uw = (UpdateWrapper<ExamPatientId>)new UpdateWrapper();
        final Map<String, Object> map = new HashMap<String, Object>();
        uw.allEq((Map)map, false);
        return this.retBool(Integer.valueOf(((ExamPatientIdMapper)this.baseMapper).update(examPatientId, (Wrapper)uw)));
    }
    
@Override
    public ExamPatientId getInfo(final ExamPatientIdDto dto) {
        final QueryWrapper<ExamPatientId> qw = (QueryWrapper<ExamPatientId>)new QueryWrapper();
        final Map<String, Object> map = new HashMap<String, Object>();
        qw.allEq((Map)map, false);
        return (ExamPatientId)((ExamPatientIdMapper)this.baseMapper).selectOne((Wrapper)qw);
    }
}
